/**
 * 2016-4-1 下午04:00:29
 */
package com.carpo.info.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "T_INFOS")
public class TInfos implements Serializable{
	
	/** */
	private static final long serialVersionUID = -4638801322202555653L;
	/** 发布ID */
	private String publishId;
	
	/** 项目ID */
	private String projectId;
	
	/** 发布名称 */
	private String publishName;
	
	/** 所属模块ID */
	private String itemId;

	/** 信息类型*/
	private String itemType;
	
	/** 发布成功后返回ID,撤回时消息时用到的id */
	private String articleId;
	
	/** 发送失败次数 */
	private int failCount = 0;

	/** 发布时间 */
	private Date publishDate;
	
	/** 创建时间 */
	private Date createTime;

	/** 发布状态 ,SUCCESS("已发布"),
	 * REMOVED("已撤销"), 
	 * WAIT("待发布"), 
	 * FAIL("发布失败"), 
	 * DOING("正在发布");*/
	private PublishStatus publishStatus;
	
	/** 发布地点*/
	private String publishSite;
	
	/** 是否延迟发布, YES("是"),NO("否");*/
	private LazyStatus isLazy;
	
	/**发布平台 -- 此处应与IBaseInfoService实现类的service名称一致*/
	private String platForm;

	@Id
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@GeneratedValue(generator = "generator")
	@Column(name = "PUBLISH_ID", nullable = false, length = 40)
	public String getPublishId() {
		return publishId;
	}

	public void setPublishId(String publishId) {
		this.publishId = publishId;
	}

	@Column(name = "PROJECT_ID", length = 40)
	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	@Column(name = "PROJECT_NAME", length = 300)
	public String getPublishName() {
		return publishName;
	}

	public void setPublishName(String publishName) {
		this.publishName = publishName;
	}

	@Column(name = "ITEM_ID", length = 40)
	public String getItemId() {
		return itemId;
	}

	public void setItemId(String itemId) {
		this.itemId = itemId;
	}
	
	@Column(name = "ITEM_TYPE", length = 6)
	public String getItemType() {
		return itemType;
	}

	public void setItemType(String itemType) {
		this.itemType = itemType;
	}

	@Column(name = "ARTICLE_ID", length = 40)
	public String getArticleId() {
		return articleId;
	}

	public void setArticleId(String articleId) {
		this.articleId = articleId;
	}

	@Column(name = "FAIL_COUNT", length = 10)
	public int getFailCount() {
		return failCount;
	}

	public void setFailCount(int failCount) {
		this.failCount = failCount;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "PUBLISH_DATE", length = 20)
	public Date getPublishDate() {
		return publishDate;
	}

	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 20)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Enumerated(EnumType.STRING)
	@Column(name = "PUBLISH_STATUS", length = 10)
	public PublishStatus getPublishStatus() {
		return publishStatus;
	}

	public void setPublishStatus(PublishStatus publishStatus) {
		this.publishStatus = publishStatus;
	}

	@Column(name = "PUBLISH_SITE", length = 300)
	public String getPublishSite() {
		return publishSite;
	}

	public void setPublishSite(String publishSite) {
		this.publishSite = publishSite;
	}

	@Enumerated(EnumType.STRING)
	@Column(name = "IS_LAZY", length = 6)
	public LazyStatus getIsLazy() {
		return isLazy;
	}

	public void setIsLazy(LazyStatus isLazy) {
		this.isLazy = isLazy;
	}

	@Column(name = "PLAT_FORM", length = 300)
	public String getPlatForm() {
		return platForm;
	}

	public void setPlatForm(String platForm) {
		this.platForm = platForm;
	}
}
